Registry Guide for Windows Registry Guide for Windows
Part of the WinGuides Network
WinGuides Network and Software
Registry tweaks, tricks & hacks to optimize, enhance and secure Microsoft Windows.

Add Custom Folder to My Computer or the Desktop (All Windows)
Category: Home > Windows > Desktop

Create your own custom system folder, like "My Documents", that can not be deleted or renamed and place it on the desktop and My Computer.

Create the following series of keys and values in the registry at [HKEY_CLASSES_ROOT\CLSID] or [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID]. The GUID, globally unique identifier, can be a random number, in this example "FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345" is used. See this article for more GUID examples.

  1. Create a new key called [HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}] and set (Default) to equal the name of the folder e.g. "My Folder".

  2. Create a new sub-key under the main key called "DefaultIcon" (i.e. [HKEY_CLASSES...ABCD1DE12345}\DefaultIcon]) and set (Default) to equal the filename for the icon you want to display e.g. "c:\windows\myicon.ico".

  3. Create a new sub-key under the main key called "InProcServer32" (i.e. [HKEY_CLASSES...ABCD1DE12345}\InProcServer32]) and set (Default) to equal "shell32.dll", also create a new String value called "ThreadingModel" and set it to "Apartment".

  4. Create a set of sub-keys starting at the main key "Shell\Open My Menu\Command" (i.e. [HKEY_CLASSES...ABCD1DE12345}\Shell\Open My Folder\Command]) and set (Default) to equal the command to execute when clicked, in this case explorer, e.g. "explorer /root,c:\MyFolder".

  5. Create a set of sub-keys starting at the main key "ShellEx\PropertySheetHandlers\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}" (i.e. [HKEY_CLASSES...ABCD1DE12345}\ShellEx\PropertySheetHandlers\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}])

  6. Create a new sub-key under the main key called "ShellFolder" (i.e. [HKEY_CLASSES...ABCD1DE12345}\ShellFolder]) and create a new Binary value called "Attributes" and set it to "00 00 00 00".

  7. (Optional) To place the folder on the desktop add the following key:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
    Explorer\Desktop\NameSpace\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}]

  8. (Optional) To place the folder in My Computer add the following key:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
    Explorer\MyComputer\NameSpace\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}]
Now the folder cannot be deleted from the desktop or My Computer, nor can it be renamed other than removing the CLSID and the entries under NAMESPACE.

Settings:
System Key: [HKEY_CLASSES_ROOT\CLSID]
Name: CLSID
Type: REG_SZ (String Value)

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

Last Modified: July 13, 2001

 Return to Index Copyright © 1998-2003. All Rights Reserved.  License